package com.resume.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * @Author: 梁云亮
 * @Date: 2021/7/17 10:11
 * @Describe:管理员表
 */
@ApiModel(value = "管理员表：Admin")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "tb_admin")
public class Admin implements Serializable {
    private static final long serialVersionUID = 1837199254524191013L;
    /**
     * 用户编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "用户编号")
    private Integer id;

    /**
     * 管理员名称
     */
    @TableField(value = "username")
    @ApiModelProperty(value = "管理员名称")
    private String username;

    /**
     * 密码
     */
    @TableField(value = "password")
    @ApiModelProperty(value = "密码")
    private String password;

    /**
     * 昵称
     */
    @TableField(value = "nickname")
    @ApiModelProperty(value = "昵称")
    private String nickname;

    /**
     * 邮箱
     */
    @TableField(value = "email")
    @ApiModelProperty(value = "邮箱")
    private String email;

    /**
     * 电话
     */
    @TableField(value = "tel")
    @ApiModelProperty(value = "电话")
    private String tel;

    /**
     * 性别
     */
    @TableField(value = "gender")
    @ApiModelProperty(value = "性别")
    private Boolean gender;

    /**
     * 生日
     */
    @TableField(value = "birth")
    @ApiModelProperty(value = "生日")
    private LocalDate birth;

    /**
     * 头像
     */
    @TableField(value = "avatar")
    @ApiModelProperty(value = "头像")
    private String avatar;

    /**
     * 外键：角色编号
     */
    @TableField(value = "role_id")
    @ApiModelProperty(value = "外键：角色编号")
    private Integer roleId;

    /**
     * 状态：1可用，2不可用
     */
    @TableField(value = "status")
    @ApiModelProperty(value = "状态：1可用，2不可用")
    private Integer status;

    /**
     * 盐值
     */
    @TableField(value = "salt")
    @ApiModelProperty(value = "盐值")
    private String salt;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    /**
     * 更新日期
     */
    @TableField(value = "update_time")
    @ApiModelProperty(value = "更新日期")
    private LocalDateTime updateTime;
}